
import java.util.Scanner;

public class delete {
	public static void main(String[] args) {
		int[] a = { 1, 2, 5, 5, 5, 7, 9 };
		int count = 0;
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();

		for (int i = 0; i < a.length; i++) {
			if (num == a[i]) {
				while (a[i] == num) {
					int s = 0;
					for (int j = i; j < a.length; j++) {
						if (j != a.length - 1) {
							a[j] = a[j + 1];
						}
						else {
							s=1;
							break;
						}
					}
					count++;
					if(s==1) {
						break;
					}
				}
			} else
				continue;
		}

		for (int i = 0; i < a.length - count; i++) {
			System.out.print(a[i] + " ");
		}
	}

}